<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%flow_pmp}}".
 *
 * @property integer $id
 * @property integer $guid
 * @property string $name
 * @property integer $buyer_guid
 * @property string $advertiser
 * @property string $pmp_price
 * @property integer $can_be_rtb
 * @property string $resource_standard
 * @property string $purchase_amount
 * @property integer $lifespan
 * @property string $start_date
 * @property string $end_date
 * @property integer $status
 * @property integer $creator
 * @property string $created_at
 * @property string $modified_at
 */
class FlowPmp extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%flow_pmp}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['guid', 'name', 'buyer_guid', 'advertiser', 'pmp_price'], 'required'],
            [['guid', 'buyer_guid', 'can_be_rtb', 'lifespan', 'status', 'creator'], 'integer'],
            [['pmp_price'], 'number'],
            [['resource_standard', 'purchase_amount'], 'string'],
            [['start_date', 'end_date', 'created_at', 'modified_at'], 'safe'],
            [['name'], 'string', 'max' => 128],
            [['advertiser'], 'string', 'max' => 64]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'guid' => 'Guid',
            'name' => 'Name',
            'buyer_guid' => 'Buyer Guid',
            'advertiser' => 'Advertiser',
            'pmp_price' => 'Pmp Price',
            'can_be_rtb' => 'Can Be Rtb',
            'resource_standard' => 'Resource Standard',
            'purchase_amount' => 'Purchase Amount',
            'lifespan' => 'Lifespan',
            'start_date' => 'Start Date',
            'end_date' => 'End Date',
            'status' => 'Status',
            'creator' => 'Creator',
            'created_at' => 'Created At',
            'modified_at' => 'Modified At',
        ];
    }
}
